package com.tangfuzhong.test;

import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.tangfuzhong.bean.Boss;
import com.tangfuzhong.bean.Car;
import com.tangfuzhong.bean.Color;
import com.tangfuzhong.config.Config05_Autowired_Qualifier_Resource_xxxAware_importSpringCoreBean;
import com.tangfuzhong.service.BookService;

public class IOCTest_05_Autowired_Qualifier_Resource_xxxAware_importSpringCoreBean {
	
	@Test
	public void test01(){
		AnnotationConfigApplicationContext applicationContext
				= new AnnotationConfigApplicationContext(Config05_Autowired_Qualifier_Resource_xxxAware_importSpringCoreBean.class);
		
		BookService bookService = applicationContext.getBean(BookService.class);
		System.out.println(bookService);
		
		//BookDao bean = applicationContext.getBean(BookDao.class);
		//System.out.println(bean);
		
		Boss boss = applicationContext.getBean(Boss.class);
		System.out.println(boss);
		Car car = applicationContext.getBean(Car.class);
		System.out.println(car);
		
		Color color = applicationContext.getBean(Color.class);
		System.out.println(color);
		System.out.println(applicationContext);
		applicationContext.close();
	}

}
